In the Bluetooth system, when a device wants to determine what other Bluetooth devices are within range, it can perform an inquiry. The conventional inquiry operation is described in “Specification of the Bluetooth System,” v1.0A, Jul. 26, 1999 (incorporated herein by reference). A device that performs the inquiry is called the master, and a device which periodically scans for inquiries with inquiry scans is called the slave. The slave wakes up every 2.56 s (or a shorter interval) to perform an inquiry scan for 18 time slots (there are 1600 time slots per second). The slave monitors a single frequency out of 32 possible frequencies. During the inquiry, the master transmits on two frequencies on one time slot and then listens on two frequencies during the next time slot. Thus, on an average, the master can transmit on 16 different frequencies during 16 time slots. The master continues to repeat the inquiry messages using the 16 frequencies for 2.56 s. There are a total of 32 possible frequencies used during inquiry, and the master splits the frequencies into two 16-hop parts, called trains. After transmitting on train A for 2.56 s, the master switches to train B. Currently, at least 3 train switches occur during inquiry, so the inquiry substate lasts at least 10.24 s.
A slave performing an inquiry scan determines a frequency to monitor based on the general inquiry access code (GIAC) and some of the bits from its native clock. The X input value into the frequency selector of the slave is given by:XS=CLKN16-12
Bit 12 of the clock changes every 1.28 s. The 5 bits from the clock (bits 16, 15, 14, 13, 12) map to the 32 frequencies that are to be monitored. If the slave wakes up every 2.56 s, then it will only end up monitoring 16 frequencies since bit 13 changes every 2.56 s.
The 16 frequencies for train A or train B are determined by the GIAC and the native clock of the master. The X input value into the frequency selector of the master is given by:XM=└CLKN16-12+κoffset+(CLKN4-2,0−CLKN16-12)mod16┘mod32  (1)where κoffset=24 gives the train A and κoffset=8 gives the train B.
One disadvantage of the conventional Bluetooth inquiry operation is that there are 32 frequencies used in the inquiry, but the master can only transmit on 16 frequencies during the 18 time slot window in which the slave scans. Because of the uncertainty of which of the 32 frequencies each slave will monitor upon wakeup, the master must spend 2.56 s on one train and 2.56 s on the second train (total of 5.12 s) before it can be sure that the slave hears its inquiry message (assuming an error-free environment). In environments where there are channel errors, the inquiry substate may need to last even longer.
It is therefore desirable to reduce the amount of time required for assurance that a slave has heard the master's inquiry.
The invention provides a technique for ensuring that the slave will be listening at a frequency contained in the frequency train that the master uses first during inquiry transmission. This can advantageously reduce the time needed for inquiry.
In conventional Bluetooth inquiry operation, when the slave hears the master's inquiry message, it does not respond immediately. To avoid collisions in the case that several slaves wake up at the same time, a random backoff procedure is employed. The slave stores the current value of the frequency at which it heard the master's inquiry message, and generates a random number between 0 and 1023. The slave then waits this random number of time slots, which corresponds to 0 to 1023/1600 s. Upon waking up, the slave listens again at the stored frequency for the master's inquiry message. If the slave receives another inquiry message from the master, then the slave immediately returns an FHS packet, which is a special control packet containing the Bluetooth device address and the clock of the sender (the slave in this case). The slave then adds an offset of 1 to (i.e., increments) the phase of the inquiry hop sequence and performs an inquiry scan on this next frequency. If the slave is triggered (i.e., hears the inquiry message) again, then it repeats the above procedure with a new random number.
During a 1.28 s probing window, a slave on average will return 4 FHS packets on different frequencies and at different times. However, if during the inquiry scan, the slave does not receive another inquiry message from the master within a time-out period, the slave returns to the standby or connection state.
Due to the backoff period, another disadvantage of the conventional Bluetooth inquiry operation is that the master may have switched trains during the backoff period. The probability of this happening is 512 time slots (the average backoff time)/4096 time slots (the time between train switches)=0.125. This is the probability for each slave, so with many slaves there is a large probability that a train switch will occur before at least one of them can respond. This is the reason that the master needs to perform the inquiry for at least 10.24 s. FIG. 5 illustrates this situation. A slave may be listening on train B while the master starts transmitting on train A for 2.56 s. Therefore, the slave does not hear the master at 52 during train A. When the master switches to train B, the slave will wake up and hear the master at 53, but if it wakes up too near the end of train B, then it may not be able to respond (which includes time to back off and then re-trigger) before the master switches back to train A, resulting in a time out at 54. The slave is finally able to respond (i.e., back off, then re-trigger, then respond) when it is triggered at 55 after the master has returned to train B. This procedure is inefficient and disadvantageously extends the inquiry time.
It is therefore desirable to avoid the inquiry time extension that can occur due to the combination of slave backoff time and train switches by the master.
The invention permits a slave to listen on frequencies which alternate from one to the other of the master's trains in correspondence with each new slave inquiry scan window. This advantageously permits avoidance of the aforementioned inquiry time extension.